<template>
  <div class="form">
    <div class="title" style="font-weight: bold;padding-bottom:10px;">信息</div>
    <a-form ref="formStateRef" layout="inline" labelAlign="left" :model="formState" class="paymentFormClass">
      <a-row :gutter="24">
        <a-col :span="6">
          <a-form-item label="一级审批" name="one" :rules="{ required: true, message: '一级审批不能为空' }">
            <a-select style="width: 100%;" v-model:value="formState.one" :disabled="isReadOnly" placeholder="请选择一级审批"
              :options="oneOptions" show-search :filter-option="filterOption"
              :getPopupContainer="(triggerNode) => triggerNode.parentNode">
            </a-select>
          </a-form-item>
        </a-col>

        <!-- <a-col :span="6">
          <a-form-item label="二级审批" name="two" v-if="isViewTwo" :rules="{ required: true, message: '二级审批不能为空' }">
            <a-select style="width: 100%;" v-model:value="formState.two" :disabled="isReadOnly" placeholder="请选择二级审批"
              :options="twoOptions" show-search :filter-option="filterOption"
              :getPopupContainer="(triggerNode) => triggerNode.parentNode">
            </a-select>
          </a-form-item>
        </a-col> -->

        <a-col :span="6">
          <a-form-item label="审批结果" name="result" :rules="{ required: true, message: '审批结果不能为空' }">
            <a-select style="width: 100%;" v-model:value="formState.result" :disabled="true" placeholder="请选择审批结果"
              :getPopupContainer="(triggerNode) => triggerNode.parentNode">
              <a-select-option :value="1">同意</a-select-option>
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </div>
</template>
<script setup>
import { onMounted, ref, watch } from "vue";
// import WrsMessageBox from "../../../../components/WrsMessageBox/index.js";
// import { getLabel } from "../../../../util/arrayUtil"
const props = {
  oneOptions: {
    default: [
      {
        label: '测试',
        value: '1'
      }
    ]
  }
}
const isViewTwo = ref(true)
const oneOptions = ref([
  {
    label: '测试',
    value: '1'
  }
]);
const twoOptions = ref([
  {
    label: '测试222',
    value: '1'
  }
]);
const formStateRef = ref();
let formState = ref({
  result: 1
});
const payMentTypeList = ref([])
const filterOption = (input, option) => {
  return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
let isReadOnly = ref(false);
defineExpose({
  formStateRef,
  formState,
  isReadOnly,
  isViewTwo
});
</script>
<style lang="less" scoped>
.paymentFormClass {
  border-bottom: 1px solid #e8e8e8;
}
</style>
